public class HourlyEmployee extends Employee
{

    private double wage;

    private double hour;;

    public HourlyEmployee()
    {
        this(" ", 0, new MyDate(0,0,0), 0.0,0.0);
    }

    public HourlyEmployee(String name, int number, MyDate birthday, double wage, double hour) {
        super(name, number, birthday);
        this.wage = wage;
        this.hour = hour;
    }

    public double getWage() {
        return wage;
    }

    public void setWage(double wage) {
        this.wage = wage;
    }

    public double getHour() {
        return hour;
    }

    public void setHour(double hour) {
        this.hour = hour;
    }

    @Override
    public double earnings() {
        return this.getHour() * this.getWage();
    }

    public String toString()
    {
        return "HourlyEmployee: " + super.toString();
    }
}
